{eval
    function bind_popup() {
        $id = L.random(4);
        $referer = dreferer();
        $params = get_params();
        $islostpwd = isset($_GET["vlostpwd"]) ? 'true' : 'false';
        global $_G;
        $static_path  = get_static_path();
        $site_url  = get_site_url();
        $bind_phone = $_G['username'];
}
<!--{block return}-->
<div id="fwin_login" class="fwinmask" style="position: fixed; z-index: 100002;left:50%;top:50%;margin-left:-150px;margin-top:-150px;">
    <table class="fwin">
        <tbody>
            <tr>
                <td class="t_l"></td>
                <td class="t_c"></td>
                <td class="t_r"></td>
            </tr>
            <tr>
                <td class="m_l"></td>
                <td class="m_c">
                    <h3 class="flb" id="fctrl_login" style="cursor: move;">
                        <em id="returnmessage_LwjSJ" fwin="login">&#32465;&#23450;&#25163;&#26426;&#21495;</em>
                        <span><a href="javascript:;" onclick="document.getElementById('fwin_login').style.display = 'none'" class="flbc" title="关闭">关闭</a></span>
                    </h3>
                    <style>
                        .vaptcha-bind-title {
                            text-align: center; 
                            padding: 10px;
                            font-weight: normal;
                        }
                        .vaptcha-bind-title .user-name {
                            font-weight: bold;
                        }
                    </style>
                    <div id="loginphone_$id" class="vaptcha-dz-form">
                        <div class="vaptcha-dz-popup v-login-form none"></div>
                        <div class="vaptcha-dz-popup lost-password-form none"></div>
                        <div class="vaptcha-dz-popup reset-password none"></div>
                        <div class="vaptcha-dz-popup bind-phone-form">
                            <h2 class="vaptcha-bind-title">{lang phone_auth:bind_phone_title}</h2>
                            {if $params['enable_inter'] == '0'}
                            <div class="dz-item2-group">
                                <input type="hidden" value="86" name="country_code">
                                <input maxlength="11"  class="form-control dz-input" placeholder="{lang phone_auth:register_phone_pl}" name="phone">
                            </div>
                            {else}
                            <div class="dz-item2-group">
                                <span class="dz-intro">
                                <div class="phonenumber">
                                    <div class="area-code btn-group dropdown">
                                        <div class="country-code active">
                                            <span class="add">+</span>
                                            <input type="text" class="form-control dz-input" value="86" name="country_code">
                                        </div>
                                        <button class="btn dropdown-toggle-split dropdown-toggle btn-down" type="button">
                                            <img src="{$static_path}/img/dropdown.png" />
                                        </button>
                                        <ul class="dropdown-menu" style="display: none">
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    CN +86
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    TW +886
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    HK +852
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    USA +1
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    JP +81
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    KP +850
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    GER +49
                                                </a>
                                            </li>
                                            <li role="menuitem">
                                                <a class="dropdown-item">
                                                    UK +44
                                                </a>
                                            </li>
                                        </ul>
                                    </div>
                                    <input autocomplete="off" maxlength="11"  placeholder="{lang phone_auth:register_phone_pl}" class="form-control bg-c dz-input" type="tel" name="phone">
                                </div>
                            </div>
                            {/if}
                            <div class="dz-item2-group clearfix none send-code-group">
                                <input class="form-control dz-input dz-input-code" placeholder="{lang phone_auth:code_pl}" type="text" name="code" />
                                <button class="btn dz-btn dz-btn-code">{lang phone_auth:send_code}</button>
                            </div>
                            <div class="dz-item2-group">
                                <div class="vaptcha_container">
                                    <div class="vaptcha-init-main">
                                        <div class="vaptcha-init-loading">
                                            <a>
                                                <img src="https://cdn.vaptcha.com/vaptcha-loading.gif" />
                                            </a>
                                            <span class="vaptcha-text">
                                                <a href="https://www.vaptcha.com/" title="{lang phone_auth:captcha}" target="_blank">{lang phone_auth:captcha}</a>{lang phone_auth:captcha_loading}</span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="dz-item2-group">
                                <button class="btn dz-btn bind-phone-btn" disabled="disabled">{lang phone_auth:click_bind}</button>
                            </div>
                        </div>
                        <div class="vaptcha-tip-cont none">
                            <div class="vaptcha-dz-tip vaptcha-tip-warn none">
                                <img class="dz-tip-icon" src="{$static_path}/img/vaptcha-dz-warning.png" />
                                <span class="dz-tip-text"></span>
                            </div>
                            <div class="vaptcha-dz-tip vaptcha-tip-success none">
                                <img class="dz-tip-icon" src="{$static_path}/img/vaptcha-dz-success.png" />
                                <span class="dz-tip-text"></span>
                            </div>
                        </div>
                    </div>
                </td>
                <td class="m_r"></td>
            </tr>
            <tr>
                <td class="b_l"></td>
                <td class="b_c"></td>
                <td class="b_r"></td>
            </tr>
        </tbody>
    </table>
</div>
<script src="{$static_path}/js/v-helper.min.js?v=$params['version']"></script>
<script>
    (function login_run() {
        if(window.v_helper) {
            new v_helper({
                'vid': "$params['vid']",
                'vaptcha_color': '#{$params["style_color"]}',
                'vaptcha_style': '{$params["btn_style"]}',
                'site_url': '{$site_url}',
                lang: {
                    send_code: '{lang phone_auth:send_code}'
                }
            }).login_run({
                id: '$id',
                islostpwd: $islostpwd,
                enable_inter: $params["enable_inter"],
                lang: {
                    login_member: '{lang phone_auth:login_member}',
                    verify_phone: '{lang phone_auth:verify_phone}',
                    password_reset: '{lang phone_auth:password_reset}',
                    bind_phone: '{lang phone_auth:bind_phone}',
                    send_code: '{lang phone_auth:send_code}'
                },
                bind_phone: true
            });
        } else {
            setTimeout(login_run);
        }
    })()
</script>
<!--{/block}-->
{eval return $return;}
{eval }
}
